def function():
    a = [18, 25, 45, 77, 18, 30, 51, 40, 6, 57, 16, 32]
    print(len(a))
    for i in range(len(a)):
        for x in range(len(a) - i - 1):
            if a[x] > a[x + 1]:
                a[x], a[x + 1] = a[x + 1], a[x]
    print(a)
    num = a[-1]
    num1 = a[-2]
    return num, num1


def function_sum():
    result = function()
    print("最大值的数", result[0])
    print("第二的值的数", result[1])


function_sum()


def year_dic(year):
    return year % 4 == 0 and year % 100 != 0 or year % 400 == 0


def YTD_dic(year, month, date):
    sky = [
        [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],  # 闰年
        [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]  # 平年
    ][year_dic(year)]
    total = 0
    for index in range(month - 1):
        total = total + sky[index]
    return total + date


def YTD_introduction():
    year_num1 = int(input("请输入年:"))
    year_num2 = int(input("请输入月:"))
    year_num3 = int(input("请输入日:"))
    print(YTD_dic(year_num1, year_num2, year_num3), "天")


YTD_introduction()


def prime_dic():
    prime_1 = int(input("请输入一个数"))
    for i in range(2, prime_1):
        if prime_1 % i == 0:
            print("不是质数")
            break
    else:
        print("是质数")


prime_dic()
